
<?php include_once(dirname(__FILE__) . '/../general/head.php'); ?>

<!-- header -->
<?php include_once(dirname(__FILE__) . '/../general/header.php'); ?>

<?php include_once('left.php'); ?>


<div id="page-wrapper">

    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">Import danh sách nhân viên</h1>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!-- /.row -->
    <div class="row">
        
        <?php if ($message) { ?>
            <div class="col-lg-12">
                <div class="alert alert-<?php echo $messageType; ?> alert-dismissable">
                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                    <?php echo $message; ?>
                </div>
            </div>
        <?php } ?>
        
        <div class="col-lg-12">
            
            
            <!-- /.panel -->
            <div class="panel panel-default">
<!--                <div class="panel-heading">
                </div>-->
                <div class="panel-body">
                    <div class="table-responsive">
<!--                        <table id="detail" class="table table-bordered table-hover">
                            <tr>
                                <td>	-->
                                    <?php echo form_open(get_folder($loggedUser['title']) . '/users2/import', array('enctype' => 'multipart/form-data')); ?>
                                    <br>
                                    <label class="radio-inline">
                                        <input type="radio" name="UploadPurpose" value="Add" <?php echo $UploadPurpose != 'Edit' ? 'checked="checked"' : ''; ?> /><font color="green">Thêm nhân viên mới </font>
                                    </label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <label class="radio-inline">
                                        <input type="radio" name="UploadPurpose" value="Edit" <?php echo $UploadPurpose == 'Edit' ? 'checked="checked"' : ''; ?> /><font color="blue">Cập nhật thông tin nhân viên</font>
                                    </label>
                                    <br/><br/>
<!--                                    <select name="cid">
                                        <option value="0">Select Category</option>
                                        <?php foreach ($category as $value) { ?>
                                            <option value="<?php echo $value->cid; ?>">
                                                <?php echo $value->category_name; ?>
                                            </option>
                                        <?php } ?>
                                    </select>-->

<!--                                    <select name="did">
                                        <option value="0">Select level</option>
                                        <?php foreach ($difficult_level as $value) { ?>
                                            <option value="<?php echo $value->did; ?>">
                                                <?php echo $value->level_name; ?>
                                            </option>
                                        <?php } ?>
                                    </select> -->
                                    
                                    Upload file excel (dạng .xls)
                                    <br><br>
                                    <input type="hidden" name="size" value="3500000">
                                    <input type="hidden" name="Command" value="Upload">
                                    <input type="file" name="xlsfile" >
                                    <br>
                                    <input type="submit" value="Import"></form>
                                    <br>
<!--                                </td>
                            </tr>
                        </table>-->
                        
                        
                    </div>
                </div>
            </div>
            
            
        </div>
        <!-- /.col-lg-12 -->
    </div>


</div>
<!-- /#page-wrapper -->

<script>
    function search()
    {
        var cid = "";
        var did = "";

        $("select[name=filter-category] option:selected").each(function() {
            cid = $(this).val();
        });
        $("select[name=filter-difficult] option:selected").each(function() {
            did = $(this).val();
        });
        window.location = '<?php echo site_url(get_folder($loggedUser['title']) . '/questions/index') ?>' + '/' + cid + '/' + did;
    }

    $(document).ready(function() {
//        var oTable = $('#att-detail-results').dataTable(
//                {
//                    "scrollX": true,
//                    "sScrollX": "120%",
//                    "columnDefs": [
//                        {
//                            "targets": [0],
//                            "visible": false,
//                            "searchable": false,
//                            "orderData": [0, 1]
//                        },
//                        {
//                            "targets": [1],
//                            "visible": false,
//                            "searchable": false,
//                            "orderData": [0, 1]
//                        },
//                        {
//                            "targets": [2],
//                            "visible": false,
//                            "searchable": false,
//                            "orderData": [0, 1]
//                        }
//                    ]
//                });

//        $('select[name=filter-category]').change(function() {
//            search();
//        });
//
//        $('select[name=filter-difficult]').change(function() {
//            search();
//        });
    });

</script>

<?php include_once(dirname(__FILE__) . '/../general/footer.php'); ?>